{include file='public/head' /}
<style type="text/css">
  .tablelist tr {
    border:1px solid #CFCFCF;
  }
  .tablelist tr td,.tablelist tr th{
    border:1px solid #CFCFCF;
  }
</style>
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main" style="padding:10px">
        <h1 class="page-header" style="color: #3399CC">公告列表
          <button type="button" class="btn btn-info"  title="添加公告" onclick="javascript:window.location.href='{:url('admin/notice/add')}'"><span class="glyphicon glyphicon glyphicon-plus"></span> 添加公告</button>
        </h1>
        <br>
        <div class="table-responsive" style="margin-top: -30px;border:none;">
          <table class="table table-striped table-hover tablelist">
            <thead>
              <tr style="background-color: #3399CC;color: white">
                <th><span class="glyphicon glyphicon-th-large"></span> <span>选择</span></th>
                <th><span class="glyphicon glyphicon-marker"></span> <span>内容</span></th>
                <th><span class="glyphicon glyphicon-tags"></span> <span>显示</span></th>
                <th><span class="glyphicon glyphicon-time"></span> <span>新增日期</span></th>
                <th><span class="glyphicon glyphicon-pencil"></span> <span>操作</span></th>
              </tr>
            </thead>
            <tbody>
              {volist name="data" id="vo"}
              <tr>
                <td>{$vo.id}</td>
                <td>
                   {if condition="mb_strlen($vo['content'],'utf-8') gt 10"}
                             {$vo.content|mb_substr=0,10,'utf-8'} ......
                          {else/}
                             {$vo.content}
                   {/if}
                </td>
                <td>
                  {if condition="$vo.show eq 1"}
                  是
                  {else/}
                  否
                  {/if}
                </td>
                <td>{$vo.create_time}</td>
                <td>
                  <a href="{:url('edit',['id'=>$vo.id])}" title="编辑" rel="1" class="btn btn-primary btn-xs" name="see" style="font-size: 10px;"><span class="glyphicon glyphicon-pencil"></span> 编辑</a>
                  <a href="{:url('del',['id'=>$vo.id])}" title="删除" rel="1" class="btn btn-danger btn-xs del" name="see" style="font-size: 10px;"><span class="glyphicon glyphicon-trash"></span> 删除</a>
              </tr>  
              {/volist}
            </tbody>
          </table>
        </div>
        <footer class="message_footer" style="margin-top: -10px;">
        <span style="float: left;margin-top: 15px;">第{$data->currentPage()} 页 / 共 {$data->lastPage()} 页 ( 总 共 {$data->total()} 条 记 录 )</span> 
        <div style="float: right;margin-top: -10px;">  
        <div class="page" style="margin-top: 5px;">
        {$data->render()}
        </div>
        </div>
        </footer>
    </div>
  </div>
</section>
</body>
</html>
<script type="text/javascript">
  //单条记录删除
  $('.del').click(function(){
      var del = confirm("你确定要删除吗？");
       if(del == false){
        return false;
      }  
  });
</script>
